a11y: Different value types cannot be equal
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 25 Aug 2020 15:32:49 +0000 (16:32 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 25 Aug 2020 15:36:08 +0000 (16:36 +0100)
Bail out early, instead of going deep into the GtkAccessibleValue type
equal() implementation, where we expect both accessible values to have
the same type.

gtk/gtkaccessiblevalue.c

index 5ea1db0488a6857a2bc34c534d8c9dd0a37415b6..2cefba0bc43c9fe6027de8b9239c5a7ae516a521 100644 (file)
@@ -185,6 +185,9 @@ gtk_accessible_value_equal (const GtkAccessibleValue *value_a,
   if (value_a == NULL || value_b == NULL)
     return FALSE;
 
+  if (value_a->value_class != value_b->value_class)
+    return FALSE;
+
   if (value_a->value_class->equal == NULL)
     return FALSE;